package org.example.lang;

import cn.hutool.core.util.RandomUtil;

/**
 * @Title : ForTest
 * @Description:
 * @author: libo@juzishuke.com
 * @date: 2023/12/19 16:07
 * @Version:1.0
 */
public class ForTest {

    public static void main(String[] args) {

        int max = RandomUtil.randomInt(10, 1000);
        max=10;
        System.out.println(max);
        breakA: for (int i = 0; i < 10; i++) {
            for (int j = 0; j < 10; j++) {
                for (int k = 0; k < 10; k++) {
                    if (max <= 0) {
                        System.out.println("break");
                        break breakA;
                    }
                    max -= k;
                    System.out.println(String.format("k = %d", k));
                }
                System.out.println(String.format("j=%d", j));
            }
            System.out.println(String.format("i=%d", i));
        }

        System.out.println("end");
    }
}
